package com.tanjun.userservice.apiservice.api;

import com.tanjun.common.constants.ServiceConstant;
import com.tanjun.common.constants.UrlConstant;
import com.tanjun.common.model.R;
import com.tanjun.userservice.apiservice.response.adminmenu.admin.AdminMenuResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

import static com.tanjun.common.constants.UrlConstant.URL_AUTH.OPEN;

@FeignClient(name = ServiceConstant.USER_SERVICE,contextId = "adminMenu")
public interface AdminMenuApi {
    /**
     * 根据角色id获取用户对应的菜单
     * @param roleIds 角色id
     * @return 菜单
     */
    @PostMapping(UrlConstant.URL_USER.INNER+"/adminMenu"+OPEN+"/getRolesMenu")
    R<List<AdminMenuResponse>> getRolesMenus(@RequestBody List<Long> roleIds);
}
